﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CardCenter/card1.master" AutoEventWireup="true" CodeFile="OnlinePurchaseCardStep1.aspx.cs" Inherits="CardCenter_OnlinePurchaseCardStep1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head1" Runat="Server">
    <script type="text/javascript" src="../Scripts/jquery-min-lastest.js"></script>
    <script src="../Scripts/jquery-ui-all-min-lastest.js" type="text/javascript"></script>    
    <script type="text/javascript" src="../Scripts/aboutverifycode.js"></script>
    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>
    <% if (false)
       {%><script src="../Scripts/jquery-vsdoc-lastest.js" type="text/javascript"></script>
    <% }%>
    
    <script type="text/javascript">
            $(function(){ 
                var regNum = /^[1-9]+[0-9]*]*$/;
                var regMobileNO = /^(((13[0-9]{1})|18[0-9]{1}|(15[0-9]{1}))+\d{8})$/;
                $("input[id*=ImgBtn_Next]").bind("click", function() { 
                     var $cardNums = $("input[id*=Txt_CardNums]").val();
                     var $mobileNO = $("input[id*=Txt_Mobile]").val();
					 var $cardPrices = $("input[id*=Txt_Price]").val(); 
                        
                      if ($mobileNO == "") {
                            alert("手机号不能为空！");
                            return false;
                      }
                        
                      if ($cardNums == "" || $cardNums <= 0) {
                            alert("购卡张数不能为空且不能小于1！");
                            $("input[id*=Txt_CardNums]").val(1);
                            return false;
                      }
					  
					  if($cardPrices == "" || !regNum.test($cardPrices)){
					  		alert("购卡金额不能为空！");
							return false;
					  }
                      
                      if (!regNum.test($cardNums)) {
                            alert("购卡张数必须为数字！");
                            $("input[id*=Txt_CardNums]").val(1);
                            return false;
                      }
                      
                      if (!regMobileNO.test($mobileNO)) {
                            alert("请输入正确的手机号码！");
                            $("input[id*=Txt_Mobile]").val("");
                            return false;
                      }
                      return true;
                
            });
              
         });
    </script>


    <style type="text/css">
        .style1
        {
            width: 58%;
            height: 181px;
        }
        .style2
        {
            width: 148px;
        }
        .style3
        {
            width: 159px;
        }
        .style4
        {
            width: 28px;
        }
        .style5
        {
            width: 42px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="r" Runat="Server">
<form id="PurchaseCardForm" runat="server">
<asp:ScriptManager ID="ScriptManagerPurchase" runat="server">
</asp:ScriptManager>
<div id="r1"><div id="r11"><a href="OnlinePurchaseCardStep1.aspx">&nbsp;&nbsp;卡务中心</a><a href="OnlinePurchaseCardStep1.aspx">&nbsp;&nbsp;>>在线购卡</a></div></div>
    <div style="width:729px; height:41px;">
    <div style="width:20px; height:41px; float:left;"></div>
     <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui1.jpg);"></div>
     <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">购卡须知</div>
     <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui2.jpg);"></div>
     <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">购卡选项</div>
    <div style="width:32px; height:41px; float:left; background-image:url(../Images/CardCenterImg/cai3.jpg);"></div>
    <div style="width:100px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:41px;">填写购卡信息</div>
    <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui4.jpg);"></div>
    <div style="width:130px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">确认购物清单和金额</div>
    <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui5.jpg);"></div>
    <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">在线支付</div>
    <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui6.jpg);"></div>
    <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">支付确认</div>
    </div>
    <div style="border-top:16px #fff solid; line-height:16px;"></div>
    <div style="border-bottom:8px #fff solid; border-top:dotted thin #ccc; line-height:8px; width:729px;"></div>
    
    <%-- 异步请求 --%>
    <asp:UpdatePanel ID="UpdatePanelPurchaseOnline" runat="server">
            <ContentTemplate>
                 <table class="style1" style="float:left;">
                    <tr>
                        <td class="style2" style="text-align:center; font-weight:bold; font-size:13px;">
                            输入手机号：</td>
                        <td class="style3">
                            <asp:TextBox ID="Txt_Mobile" runat="server" BorderWidth="1px" Height="20px" 
                                Width="150px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2" style="text-align:center; font-weight:bold; font-size:13px;">
                            选择购卡点数：</td>
                        <td class="style3">
                            <asp:DropDownList ID="DDL_ProductList" runat="server" 
                                onselectedindexchanged="DDL_ProductList_SelectedIndexChanged" AutoPostBack="true">
                            </asp:DropDownList>
                        </td>
                    </tr>
                      <tr>
                        <td class="style2" style="text-align:center; font-weight:bold; font-size:13px;">
                            单价：</td>
                        <td class="style3">
                            ￥<asp:TextBox ID="Txt_Price" runat="server" ReadOnly="true"  ForeColor="Red"
                                Font-Underline="true" Width="50px"></asp:TextBox>元/张
                        </td>
                    </tr>
                    <tr>
                        <td class="style2" style="text-align:center; font-weight:bold; font-size:13px;">
                            购卡张数：</td>
                        <td class="style3">
                            <asp:TextBox ID="Txt_CardNums" runat="server" Height="20px" BorderWidth="1px" 
                                Width="150px" Text="1"></asp:TextBox>
                        </td>
                        <td class="style4">
                            <asp:ImageButton ID="ImgBtn_Add" runat="server" 
                                ImageUrl="~/Images/CardCenterImg/jia.jpg" onclick="ImgBtn_Add_Click"/>
                                        </td>
                            <td>
                                <asp:ImageButton ID="ImgBtnMins" runat="server" 
                                    ImageUrl="~/Images/CardCenterImg/jian.jpg" onclick="ImgBtnMins_Click" />
                           </td>
                            <td>&nbsp;
                                </td>
                    </tr>
                </table>
            </ContentTemplate>
    </asp:UpdatePanel>
   
        <%-- 进入下一步 --%>

    
    <div style="width:166px; height:111px; float:left;">
        <img alt="" src="../Images/CardCenterImg/card12.jpg" /></div>
    <table style="clear:both; width:700px;">
        <tr>
             <td class="style5" style="text-align:center; font-weight:bold; font-size:13px;">&nbsp;
                 </td>
            <td class="style3">
                <asp:ImageButton ID="ImgBtn_Next" runat="server"  
                    ImageUrl="~/Images/CardCenterImg/next.jpg"  onclick="ImgBtn_Next_Click"/>
            </td>
        </tr>
    </table>
    <div style="border-top:16px #fff solid; line-height:16px; clear:both;"></div>
    <div style="border-bottom:8px #fff solid; border-top:dotted thin #ccc; line-height:8px; width:729px; "></div>
    <div style="width:729px; height:270px;">
    <fieldset>
    <legend style="font-size:12px; color:#888; line-height:30px;">提示信息</legend>
    <p style="font-size:12px; color:#888; line-height:14px;">&nbsp;&nbsp; 其手机号码仅作为接受卡号和卡密的接收端.其手机号码作为接受咨询卡卡号和咨询卡密码的接收端，且作为该咨询卡密码查询、购卡历史查询接收短信的手机号码。 </p>
    </fieldset>
    </div>
    </form>
</asp:Content>

